<%@ page contentType="application/json; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="pe.gob.pnp.despachadores.*" %>
<%@ page import="pe.gob.pnp.actions.*" %>
<%@ page import="java.util.*"%>
<%
    String expediente = request.getParameter("expediente");
    List<DictamenBean>  listadictamen = DictamenDespachador.obtenerDictamen(Integer.parseInt(expediente));
    pageContext.setAttribute("dictamen", listadictamen);
%>
<c:set var="i" value="0"></c:set>
{
		tablaDictamen:
		[
        <c:forEach var="dictamen" items="${dictamen}">
             <%
               /* DictamenBean obj= (DictamenBean) pageContext.getAttribute("dictamen");
                String res  = obj.getCdict_resuelve()!=null ? obj.getCdict_resuelve() : "";
		//res = obs.replaceAll("\"","'").replaceAll("\'","\\\'").replaceAll("\r\n","\\\\n");
		res = res.replace( new Character('\n'),new Character(' ') ).replace( new Character('\r'),new Character(' ') );
		pageContext.setAttribute("res", res);

                String obs  = obj.getCdict_observaciones()!=null ? obj.getCdict_observaciones() : "";
		//obs = obs.replaceAll("\"","'").replaceAll("\'","\\\'").replaceAll("\r\n","\\\\n");
		obs = obs.replace( new Character('\n'),new Character(' ') ).replace( new Character('\r'),new Character(' ') );
		pageContext.setAttribute("obs", obs);*/
            %>
        ${i>0 ? "," : ""}
	{
            ndict_identificador: ${dictamen.ndict_identificador},
            nexpe_identificador: ${dictamen.nexpe_identificador},
            ddict_fecha: "${dictamen.ddict_fecha}",
            cdict_referencia: "${dictamen.cdict_referencia}",
            cdict_instructor: "${dictamen.cdict_instructor}",
            cdict_folios: "${dictamen.cdict_folios}",
            cdict_solicita: "${dictamen.cdict_solicita}"
	}
        <c:set var="i" value="${i+1}"></c:set>
        </c:forEach>
		]
}
